<!--
Computer Science Course 531 - Introduction to Software Engineering
Olive Insurance Client Management System (Client Database Access)
Version 1.0 (Base System)
Spring 2011

-- Source Code Details --
Page Tile: mainPage.php
Created By: David Gonzalez, Computer Science (Undergraduate)
Documented By: Darrius Serrant, Computer Science (Undergraduate)
Purpose: User interface that provides users access to all of this application's basic
         functionalities:
            (a) Adding, modifying, and removing agency groups to relational database.
            (b) Adding, modifying, and removing employees to the relational database.
            (c) Generating reports that reflect the database's contents.
          Users who are authorized system administrators have additional access to the
          following functionalities:
            (a) Adding, modifying, and removing user accounts
            (b) Adding, modifying, and removing carrier and coverage types

Status: In Process: Replaced form buttons with anchor tags to better reflect the incorporated
                    MySQL functionality.
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Choose Database:</title>
    </head>
    <h2>Choose Database:</h2>
    <body>
        <?php
        $display = "";
        if(isset($_COOKIE['user_name'])){
            if($_COOKIE['user_name'] == "Admin"){
                $display = "A";
            }else{
                $display = "O";
            }
        }else{
            echo 'You aren\'t logged in! <br>';
            header('Refresh: 2; http://localhost:8888/PHP3/signIn.php');
            echo 'You will be transfered to Sign In page...';
        }

        if($display == "A"){
            echo '<a href ="agencyGroupDetails.php">Group Database</a><br />';
            echo '<a href ="employeeDetails.php">Employee Database</a><br />';
            echo '<a href ="agentAccountDetails.php">Agent Database</a><br />';
            echo '<a href ="carrierDetails.php">Carrier Database</a><br />';
            echo '<a href ="coverageTypeDetails.php">Coverage Type Database</a><br />';
            echo '<a href ="reportDetails.php">Generate Reports</a><br />';
            echo '<a href ="logOut.php">Log Out</a><br />';
        }
        if($display == "O"){
            echo '<a href ="agencyGroupDetails.php">Group Database</a><br />';
            echo '<a href ="employeeDetails.php">Employee Database</a><br />';
            echo '<a href ="reportDetails.php">Generate Reports</a><br />';
            echo '<a href ="logOut.php">Log Out</a><br />';
        }
        ?>

    </body>
</html>